10 REM ANALYSIS PROGRAM FOR MICROSTRIP ANTENNAS
20 REM "ANTENNA DESIGN USING PERSONAL COMPUTERS"
30 REM K. CARVER'S CAVITY MODEL
40 DIM FLDA(180)
50 PI=3.141593
60 DEF FNLOG10(X)=.4343*LOG(X)
70 KEY OFF
80 SCREEN 0,1
90 CLS
100 COLOR 1,0
110 PRINT "MICROSTRIP ANTENNA ANALYSIS"
120 COLOR 4,0
130 PRINT
140 INPUT "TYPE PATCH RESONANT LENGTH(cm)";L1
150 INPUT "TYPE PATCH WIDTH(cm)";W1
160 INPUT "TYPE DIELECTRIC CONSTANT";DC
170 INPUT "TYPE SUBSTRATE THICKNESS(cm)";THK
180 INPUT "TYPE LOSS TANGENT";LT
190 IF LT<1E-08 THEN LT=1E-08
200 INPUT "TYPE DISTANCE FROM FEED PT. TO RAD. EDGE(cm)";DIST
210 COLOR 14,0
220 F1=SQR(1/(1+10*THK/W1))
230 REM EFFECTIVE DIELECTRIC CONSTANT
240 EDC=(DC+1)/2+(DC-1)/2*F1
250 REM AW=2*L1*SQR(EDC)
260 AW=2.08*L1*SQR(DC)
270 REM WALL CONDUCTANCE
280 GWL=8.360001E-03*W1/AW
290 REM EFFECTIVE LENGTH EXTENSION
300 K=.412*((EDC+.3)/(EDC-.258))*((W1/THK+.262)/(W1/THK+.813))
310 REM WALL SUSCEPTANCE
320 BWL=.01668*K*(L1/AW)*EDC
330 F=.7747+.5977*(W1/L1-1)-.1638*(W1/L1-1)^2
340 ALR=-2362*THK*BWL*F/(AW*W1)
350 ALI=2362*THK*GWL*F/(AW*W1)
360 KPR=ALR*L1
370 KPI=ALI*L1
380 DEL0IF FLDA(TH)>FMAX THEN FMAX=FLDA(TH)1332210 NEXT TH1332220 REM FILL OTHER HALF OF ARRAY1332230 FOR TH=181 TO 3601332240 FLDA(TH)=FLDA(360-TH)1332250 NEXT TH1332260 PRINT1332270 REM NORMALIZE DATA1332280 FOR TH=0 TO 3601332290 FM=FLDA(TH)/FMAX1357800 IF
480 FOR TH=0 TO 360
490 FM=FLDA(TH)/FMAX
500 IF FM<.001 THEN FM=.001
510 FLDA(TH)=10*FNLOG10(FM)
520 NEXT TH
530 REM FIND BEAMWIDTH
540 TH=INT(THMAX-.5)
550 TH=TH+1
560 IF FLDA(TH)>-3 THEN GOTO 550
570 TH0=(-3-FLDA(TH-1)+(TH-1)*(FLDA(TH)-FLDA(TH-1)))/(FLDA(TH)-FLDA(TH-1))
580 BW=(TH0-THMAX)*2
590 REM PLOT GRID
600 SCREEN 2,0
610 VIEW (262,20)-(638,188)
620 WINDOW (-1,-1)-(1,1)
630 CIRCLE (0,0),1,,,,.45
640 CIRCLE (0,0),.666,,,,.45
650 CIRCLE (0,0),.333,,,,.45
660 FOR THD=0 TO 150 STEP 30
670 TH=THD*ROD
680 LINE (COS(TH),SIN(TH))-(-COS(TH),-SIN(TH))
690 NEXT THD
700 PSET (FLDA(0)/30+1,0)
710 FOR TH=0 TO 360
720 THR=TH*ROD
730 RAD=FLDA(TH)/30+1
740 LINE -(RAD*COS(THR),RAD*SIN(THR))
750 NEXT TH
760 PRINT USING "SCAN ANGLE=###.# deg.";90-THMAX
770 PRINT USING "3 dB BEAMWIDTH=###.# deg.";BW
780 PRINT "10 dB/DIV."
790 PRINT
800 INPUT "CONTINUE(Y,N)";K$
810 IF K$<>"N" THEN GOTO 70
820 SCREEN 0,1
830 KEY ON
840 END
